package com.ithei.yuchunlei;

import javax.ws.rs.core.MediaType;








import org.apache.cxf.jaxrs.client.WebClient;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cn.itcast.bos.constant.Constants;
import cn.itcast.bos.domain.base.Area;
import cn.itcast.bos.domain.take_delivery.Order;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("file:src/main/resources/applicationContext.xml")
public class Mode {
	
	
	@Test
	public void test02(){
		Area area = new Area();
		area.setProvince("湖北");
		area.setCity("武汉");
		area.setDistrict("江夏区");
		Order order = new Order();
		order.setSendArea(area);
		WebClient
		.create(Constants.BOS_MANAGEMENT_URL
				+ "/services/orderService/order")
		.type(MediaType.APPLICATION_JSON).post(order);
		
	}

}
